package com.easy.project.base.validate;

import com.easy.project.base.validate.validator.DateFormatValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * 日期格式验证
 * @author wxz
 */
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy ={DateFormatValidator.class})
public @interface DateFormatValidate {

    /**
     * 日期格式化
     * @return
     */
    String format() default "";

    String message() default "日期格式错误";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
